package com.example.jetpacktest.work

import android.content.Context
import android.util.Log
import androidx.work.Worker
import androidx.work.WorkerParameters

class MyWork001(context: Context, workerParams: WorkerParameters) : Worker(context, workerParams) {

    private val TAG: String = this.javaClass.simpleName

    override fun doWork(): Result {
        Log.d(TAG, "MyWork001.......doWork()开始")
        Thread.sleep(1 * 30 * 1000)
        Log.d(TAG, "MyWork001.......doWork()结束")
        return Result.success()
    }

    override fun onStopped() {
        super.onStopped()
        Log.d(TAG, "MyWork001.......onStopped()回调...")
    }

}